<!DOCTYPE HTML>
<html lang="en" >
    
    <head>
        
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <title>关系选择器 | Introductionbgg</title>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta name="description" content="">
        <meta name="generator" content="GitBook 2.6.7">
        
        
        <meta name="HandheldFriendly" content="true"/>
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../gitbook/images/apple-touch-icon-precomposed-152.png">
        <link rel="shortcut icon" href="../../gitbook/images/favicon.ico" type="image/x-icon">
        
    <link rel="stylesheet" href="../../gitbook/style.css">
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-highlight/website.css">
        
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-search/search.css">
        
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-fontsettings/website.css">
        
    
    

        
    
    
    <link rel="next" href="../../md/css/伪类选择器.html" />
    
    
    <link rel="prev" href="../../md/css/ID选择器.html" />
    

        
    </head>
    <body>
        
        
    <div class="book"
        data-level="2.2.4"
        data-chapter-title="关系选择器"
        data-filepath="md/css/关系选择器.md"
        data-basepath="../.."
        data-revision="Wed Dec 13 2017 12:26:06 GMT+0800 (中国标准时间)"
        data-innerlanguage="">
    

<div class="book-summary">
    <nav role="navigation">
        <ul class="summary">
            
            
            
            

            

            
    
        <li class="chapter " data-level="0" data-path="index.html">
            
                
                    <a href="../../index.html">
                
                        <i class="fa fa-check"></i>
                        
                        Introduction
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1" data-path="md/HTML/HTML系列.html">
            
                
                    <a href="../../md/HTML/HTML系列.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.</b>
                        
                        HTML系列
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1" data-path="md/HTML/20171205pm.html">
            
                
                    <a href="../../md/HTML/20171205pm.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.</b>
                        
                        20171205pm
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1.1" data-path="md/HTML/a标签.html">
            
                
                    <a href="../../md/HTML/a标签.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.1.</b>
                        
                        a标签
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.1.2" data-path="md/HTML/img标签.html">
            
                
                    <a href="../../md/HTML/img标签.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.2.</b>
                        
                        img标签
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.1.3" data-path="md/HTML/表格.html">
            
                
                    <a href="../../md/HTML/表格.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.3.</b>
                        
                        表格
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.1.4" data-path="md/HTML/热区.html">
            
                
                    <a href="../../md/HTML/热区.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.4.</b>
                        
                        热区
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="md/HTML/20171210pm.html">
            
                
                    <a href="../../md/HTML/20171210pm.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.2.</b>
                        
                        20171210pm
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="md/HTML/video标签.html">
            
                
                    <a href="../../md/HTML/video标签.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.2.1.</b>
                        
                        video标签
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="md/HTML/picture标签.html">
            
                
                    <a href="../../md/HTML/picture标签.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.2.2.</b>
                        
                        picture标签
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.2.3" data-path="md/HTML/audio标签.html">
            
                
                    <a href="../../md/HTML/audio标签.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.2.3.</b>
                        
                        audio标签
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="md/HTML/20171210am.html">
            
                
                    <a href="../../md/HTML/20171210am.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.3.</b>
                        
                        20171210am
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="md/HTML/iframe标签.html">
            
                
                    <a href="../../md/HTML/iframe标签.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.3.1.</b>
                        
                        iframe标签
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="md/HTML/form表单标签.html">
            
                
                    <a href="../../md/HTML/form表单标签.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.3.2.</b>
                        
                        form表单标签
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.3.3" data-path="md/HTML/列表.html">
            
                
                    <a href="../../md/HTML/列表.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.3.3.</b>
                        
                        列表
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.3.4" data-path="md/HTML/实体字符.html">
            
                
                    <a href="../../md/HTML/实体字符.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.3.4.</b>
                        
                        实体字符
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2" data-path="md/css/css大纲.html">
            
                
                    <a href="../../md/css/css大纲.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.</b>
                        
                        css大纲
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1" data-path="md/css/css引入方式.html">
            
                
                    <a href="../../md/css/css引入方式.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.</b>
                        
                        css引入方式
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2" data-path="md/css/选择器.html">
            
                
                    <a href="../../md/css/选择器.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.</b>
                        
                        选择器
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.2.1" data-path="md/css/元素选择器.html">
            
                
                    <a href="../../md/css/元素选择器.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.1.</b>
                        
                        元素选择器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2.2" data-path="md/css/class选择器.html">
            
                
                    <a href="../../md/css/class选择器.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.2.</b>
                        
                        class选择器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2.3" data-path="md/css/ID选择器.html">
            
                
                    <a href="../../md/css/ID选择器.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.3.</b>
                        
                        ID选择器
                    </a>
            
            
        </li>
    
        <li class="chapter active" data-level="2.2.4" data-path="md/css/关系选择器.html">
            
                
                    <a href="../../md/css/关系选择器.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.4.</b>
                        
                        关系选择器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2.5" data-path="md/css/伪类选择器.html">
            
                
                    <a href="../../md/css/伪类选择器.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.5.</b>
                        
                        伪类选择器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2.6" data-path="md/css/属性选择器.html">
            
                
                    <a href="../../md/css/属性选择器.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.6.</b>
                        
                        属性选择器
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2.7" data-path="md/css/伪对象选择器.html">
            
                
                    <a href="../../md/css/伪对象选择器.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.7.</b>
                        
                        伪对象选择器
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2.3" data-path="md/css/关于gitbook.html">
            
                
                    <a href="../../md/css/关于gitbook.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.3.</b>
                        
                        关于gitbook
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    


            
            <li class="divider"></li>
            <li>
                <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
                    Published with GitBook
                </a>
            </li>
            
        </ul>
    </nav>
</div>

    <div class="book-body">
        <div class="body-inner">
            <div class="book-header" role="navigation">
    <!-- Actions Left -->
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../../" >Introductionbgg</a>
    </h1>
</div>

            <div class="page-wrapper" tabindex="-1" role="main">
                <div class="page-inner">
                
                
                    <section class="normal" id="section-">
                    
                        <h3 id="&#x5173;&#x7CFB;&#x9009;&#x62E9;&#x5668;">&#x5173;&#x7CFB;&#x9009;&#x62E9;&#x5668;</h3>
<p>&#x6709;&#x56DB;&#x79CD;&#x5173;&#x7CFB;</p>
<h4 id="&#x7236;&#x5B50;&#x5173;&#x7CFB;&#xFF08;&#xFF09;">&#x7236;&#x5B50;&#x5173;&#x7CFB;&#xFF08;&gt;&#xFF09;</h4>
<p>  &#x901A;&#x8FC7;&#x6307;&#x5B9A;&#x7236;&#x5143;&#x7D20;&#x4EE5;&#x53CA;&#x5176;&#x5177;&#x4F53;&#x7684;&#x5B50;&#x5143;&#x7D20;&#xFF0C;&#x6765;&#x6307;&#x5B9A;&#x6211;&#x4EEC;&#x7684;&#x63A7;&#x5236;&#x76EE;&#x6807;</p>
<pre><code>&#x6CE8;&#x610F;&#xFF1A;&#x66F4;&#x7CBE;&#x51C6;&#x7684;&#x63A7;&#x5236;&#xFF0C;&#x53EF;&#x4EE5;&#x5C0F;&#x8303;&#x56F4;&#x7684;&#x63A7;&#x5236;&#x67D0;&#x4E00;&#x7C7B;&#x5143;&#x7D20;&#x3002;
</code></pre><pre><code>&lt;head&gt;
&lt;style type=&quot;text/css&quot;&gt;
.nav&gt;li{
                font-size: 30px;
                font-weight:bold;/*&#x6587;&#x5B57;&#x52A0;&#x7C97;*/

            }
&lt;/style&gt;
    &lt;/head&gt;
    &lt;body&gt;
        &lt;ul class=&quot;nav&quot;&gt;
            &lt;li&gt;&#x9996;&#x9875;&lt;/li&gt;
            &lt;li&gt;&#x4EA7;&#x54C1;&lt;/li&gt;
                &lt;ul class=&quot;subnav&quot;&gt;
                    &lt;li&gt;&#x5546;&#x54C1;1&lt;/li&gt;
                    &lt;li&gt;&#x5546;&#x54C1;2&lt;/li&gt;
                    &lt;li&gt;&#x5546;&#x54C1;3&lt;/li&gt;

                &lt;/ul&gt;
            &lt;li&gt;&#x5173;&#x4E8E;&#x6211;&#x4EEC;&lt;/li&gt;

        &lt;/ul&gt;
    &lt;/body&gt;
</code></pre><h4 id="&#x540E;&#x4EE3;&#x5173;&#x7CFB;&#xFF08;&#x7A7A;&#x683C;&#xFF09;">&#x540E;&#x4EE3;&#x5173;&#x7CFB;&#xFF08;&#x7A7A;&#x683C;&#xFF09;</h4>
<p> &#x901A;&#x8FC7;&#x5199;&#x51FA;&#x7236;&#x5143;&#x7D20;&#x53CA;&#x5176;&#x540E;&#x4EE3;&#x5143;&#x7D20;&#xFF0C;&#x6765;&#x6307;&#x5B9A;&#x4E3A;&#x6211;&#x4EEC;&#x7684;&#x63A7;&#x5236;&#x76EE;&#x6807;</p>
<pre><code>  &#x6CE8;&#x610F;&#xFF1A;&#x8FD9;&#x79CD;&#x4F1A;&#x6BD4;&#x7236;&#x5B50;&#x5173;&#x7CFB;&#xFF0C;&#x63A7;&#x5236;&#x7684;&#x8303;&#x56F4;&#x8981;&#x5927;&#xFF0C;&#x56E0;&#x4E3A;&#x5B83;&#x662F;&#x9488;&#x5BF9;&#x6240;&#x6709;&#x7684;&#x540E;&#x4EE3;&#x5143;&#x7D20;
</code></pre><pre><code>&lt;head&gt;
&lt;style type=&quot;text/css&quot;&gt;
.nav li{
                text-shadow: 2px 2px 5px gray;/* &#x5B57;&#x4F53;&#x9634;&#x5F71; &#x524D;&#x9762;&#x4EE3;&#x8868;&#x504F;&#x79FB;&#x91CF; &#x53F3;&#x8FB9;&#xFF0C;&#x4E0B;&#x8FB9;&#xFF0C;&#x6A21;&#x7CCA;&#x5EA6;*/

            }
            .subnav{
                font-size: 20px;
                font-weight:normal;
            }
&lt;/style&gt;
&lt;/head&gt;
    &lt;body&gt;
        &lt;ul class=&quot;nav&quot;&gt;
            &lt;li&gt;&#x9996;&#x9875;&lt;/li&gt;
            &lt;li&gt;&#x4EA7;&#x54C1;&lt;/li&gt;
                &lt;ul class=&quot;subnav&quot;&gt;
                    &lt;li&gt;&#x5546;&#x54C1;1&lt;/li&gt;
                    &lt;li&gt;&#x5546;&#x54C1;2&lt;/li&gt;
                    &lt;li&gt;&#x5546;&#x54C1;3&lt;/li&gt;

                &lt;/ul&gt;
            &lt;li&gt;&#x5173;&#x4E8E;&#x6211;&#x4EEC;&lt;/li&gt;

        &lt;/ul&gt;
    &lt;/body&gt;
</code></pre><h4 id="&#x76F8;&#x90BB;&#x5173;&#x7CFB;&#xFF08;&#xFF09;">&#x76F8;&#x90BB;&#x5173;&#x7CFB;&#xFF08;+&#xFF09;</h4>
<p>&#x901A;&#x8FC7;&#x5199;&#x51FA;&#x53C2;&#x7167;&#x5143;&#x7D20;&#x548C;&#x5B83;&#x7684;&#x76F8;&#x90BB;&#x5143;&#x7D20;&#x6765;&#x6307;&#x5B9A;&#x6211;&#x4EEC;&#x7684;&#x63A7;&#x5236;&#x76EE;&#x6807; </p>
<pre><code>&#x6CE8;&#x610F;&#xFF1A;&#x63A7;&#x5236;&#x7684;&#x662F;&#x5176;&#x4E2D;&#x7684;&#x4E00;&#x4E2A;&#x5144;&#x5F1F;&#x5143;&#x7D20;
</code></pre><pre><code>&lt;head&gt;
&lt;style type=&quot;text/css&quot;&gt;
    .subnav&gt;li+li{
                color: blue;
            }
&lt;/style&gt;
&lt;/head&gt;
    &lt;body&gt;
        &lt;ul class=&quot;nav&quot;&gt;
            &lt;li&gt;&#x9996;&#x9875;&lt;/li&gt;
            &lt;li&gt;&#x4EA7;&#x54C1;&lt;/li&gt;
                &lt;ul class=&quot;subnav&quot;&gt;
                    &lt;li&gt;&#x5546;&#x54C1;1&lt;/li&gt;
                    &lt;li&gt;&#x5546;&#x54C1;2&lt;/li&gt;
                    &lt;li&gt;&#x5546;&#x54C1;3&lt;/li&gt;

                &lt;/ul&gt;
            &lt;li&gt;&#x5173;&#x4E8E;&#x6211;&#x4EEC;&lt;/li&gt;

        &lt;/ul&gt;
    &lt;/body&gt;
</code></pre><h4 id="&#x5144;&#x5F1F;&#x5173;&#x7CFB;&#xFF08;&#xFF09;">&#x5144;&#x5F1F;&#x5173;&#x7CFB;&#xFF08;~&#xFF09;</h4>
<p>&#x901A;&#x8FC7;&#x5199;&#x51FA;&#x53C2;&#x7167;&#x5143;&#x7D20;&#x548C;&#x5B83;&#x7684;&#x540E;&#x7EED;&#x540C;&#x8F88;&#x5143;&#x7D20;&#x6765;&#x6307;&#x5B9A;&#x6211;&#x4EEC;&#x7684;&#x63A7;&#x5236;&#x76EE;&#x6807;</p>
<pre><code>&#x63A7;&#x5236;&#x7684;&#x662F;&#x540E;&#x7EED;&#x540C;&#x8F88;&#x7684;&#x6240;&#x6709;&#x7B26;&#x5408;&#x6761;&#x4EF6;&#x7684;&#x5144;&#x5F1F;&#x5143;&#x7D20;
</code></pre><pre><code>&lt;head&gt;
&lt;style type=&quot;text/css&quot;&gt;
.subnav&gt;li~li{
                border: 10px solid pink;
            }
&lt;/style&gt;
&lt;/head&gt;
    &lt;body&gt;
        &lt;ul class=&quot;nav&quot;&gt;
            &lt;li&gt;&#x9996;&#x9875;&lt;/li&gt;
            &lt;li&gt;&#x4EA7;&#x54C1;&lt;/li&gt;
                &lt;ul class=&quot;subnav&quot;&gt;
                    &lt;li&gt;&#x5546;&#x54C1;1&lt;/li&gt;
                    &lt;li&gt;&#x5546;&#x54C1;2&lt;/li&gt;
                    &lt;li&gt;&#x5546;&#x54C1;3&lt;/li&gt;

                &lt;/ul&gt;
            &lt;li&gt;&#x5173;&#x4E8E;&#x6211;&#x4EEC;&lt;/li&gt;

        &lt;/ul&gt;
    &lt;/body&gt;
</code></pre>
                    
                    </section>
                
                
                </div>
            </div>
        </div>

        
        <a href="../../md/css/ID选择器.html" class="navigation navigation-prev " aria-label="Previous page: ID选择器"><i class="fa fa-angle-left"></i></a>
        
        
        <a href="../../md/css/伪类选择器.html" class="navigation navigation-next " aria-label="Next page: 伪类选择器"><i class="fa fa-angle-right"></i></a>
        
    </div>
</div>

        
<script src="../../gitbook/app.js"></script>

    
    <script src="../../gitbook/plugins/gitbook-plugin-search/lunr.min.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-search/search.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-sharing/buttons.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-fontsettings/buttons.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-livereload/plugin.js"></script>
    

<script>
require(["gitbook"], function(gitbook) {
    var config = {"highlight":{},"search":{"maxIndexSize":1000000},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"livereload":{}};
    gitbook.start(config);
});
</script>

        
    </body>
    
</html>
